<template>
	<view class="main">
		<!-- <view class="fangwurenzheng">
			<view class="fanhuijiemian">
				<view class="fanhui" @click="fanhui">
					<image class="fanh-img" src="../../static/images/index/向左箭头(1).png" mode=""></image>
					<view class="fanh">返回</view>
				</view>
				<view class="fanwu">房屋认证</view>
			</view>
		</view> -->
		
		<!-- 房屋信息 -->
		<selecthouse :index="index" :name="name" :data="data" @getselectbid="getselectbid"></selecthouse>
		
	</view>
</template>

<script>
	import {mapState} from 'vuex'
	export default{
		data(){
			return {
				index:'',
				mindex:'',
				name:'',
				data:[]
			}
		},
		onLoad(options){
			this.index = options.index
			let arr = this.index.split(',')
			this.name =this.buildingdata[arr[0]].name+this.buildingdata[arr[0]].children[arr[1]].name
			
			this.data =this.buildingdata[arr[0]].children[arr[1]].children
		},
		methods:{
			getselectbid(bid){
				uni.navigateTo({
					url:'/pages/HousePage/HousePage4?index='+bid
				})
			},
			bindPickerChange(e){
				this.index = e.detail.value
			},
			
		},
		computed:{
			...mapState(['buildingdata'])
		}
	}
</script>


<style lang="less">
	@import url('../../static/css/housePage/housepage3/housepage.css');
</style>